package controller;

import model.UnloadDAO;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.sql.Timestamp;

@Controller
public class SiteUnload{

    @Autowired
    UnloadDAO unloadDAO;

    @ResponseBody
    @RequestMapping(value="site_unload", produces = "text/html;charset=utf-8")
    public String getUnloadData(@RequestParam(value="start", required=true)Timestamp start,
                                @RequestParam(value="end", required=true)Timestamp end,
                                @RequestParam(value="site", required=true) String site) {
        JSONObject json = new JSONObject();
        json.put("ewb", "apple");
        json.put("catsType", "train");
        return json.toString();
    }
}
